home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Spanish Scene 1
/
SpanishScene1.iso
/
spanish pack n°1 by llfb
/
--llfb--
/
programas
/
sources1.dms
/
sources1.adf
/
SOURCES
/
Efectos_Copper
/
SinusCop.ASM
< prev
Wrap
Assembly Source File
|
1996-06-04
|
8KB
|
301 lines
; I+ Copper by T.J.
; Thanks to DELTA of RSI for his amazing copper-intro! This
; program is original code.... no rip off!!!
; [1] change to double buffering of copperlist
; [2] scroll text
; [3] lots of effects and a moving logo (?)
width=41
s=width*4+4
amplitude=80
section roman,code_c
start: move.l 4,a6
move.w #$4000,$dff09a
move.w #$7fff,$dff096
bsr.L clr_sprites
bsr.L set_bitplanes
bsr.L make_sin_tab
move.l #copper,$dff080
clr.w $dff088
move.w #$83ff,$dff096
move.w #$3141,d0
lea copsinus,a0
move.w #199,d1
l1: move.w d0,(a0)
move.w #$fffe,2(a0)
move.l #$01800000,width*4-4(a0)
adda #width*4,a0
add.w #$0100,d0
dbra d1,l1
main_loop: cmp.b #255,$dff006
bne.s main_loop
move.l #copsinus,$dff050
move.l #copsinu1,$dff054
move.l #0,$dff064
move.l #$09f00000,$dff040
move.l #-1,$dff044
move.w #64*400+41,$dff058
bsr.L wait_blit
addq.w #6,sinuspn1
andi.w #510,sinuspn1
addq.w #8,sinuspn2
andi.w #510,sinuspn2
lea sincos,a4
move.w sinuspn1,d7
move.w #width-3,d2
lea copsinus+4,a0
lea coptbl,a1
l3: move.l a0,a2
move.l a1,a3
move.w (a4,d7.w),d1
muls #amplitude,d1
lsl.l #1,d1
swap d1
addi.w #amplitude,d1
lsl #2,d1
adda.w d1,a3
move.l a3,$dff050
move.l a2,$dff054
move.w #width*8-4,$dff066
move.w #99*64+2,$dff058
bsr.L wait_blit
addq #2,d7
andi.w #510,d7
addq #4,a0
dbra d2,l3
move.w sinuspn2,d7
move.w #width-3,d2
lea copsinus+s,a0
l2: move.l a0,a2
move.l a1,a3
move.w (a4,d7.w),d1
muls #amplitude,d1
lsl.l #1,d1
swap d1
addi.w #amplitude,d1
lsl #2,d1
adda.w d1,a3
move.l a3,$dff050
move.l a2,$dff054
move.w #99*64+2,$dff058
bsr.S wait_blit
addq #2,d7
andi.w #510,d7
addq #4,a0
dbra d2,l2
chk_mouse: btst #6,$bfe001
bne.L main_loop
end: bsr.S wait_blit
move.l 4,a6
move.l #grname,a1
clr.l d0
jsr -552(a6)
move.l d0,a4
move.l 38(a4),$dff080
clr.w $dff088
move.w #$83e0,$dff096
move.w #$c000,$dff09a
clr.l d0
rts
wait_blit: btst #14,$dff002
bne.s wait_blit
rts
set_bitplanes: move.l #scr_buffer,d0
lea bpls,a0
moveq #3,d1
set_bpl_pnt: move.w d0,6(a0)
swap d0
move.w d0,2(a0)
swap d0
add #40,d0
addq #8,a0
dbra d1,set_bpl_pnt
rts
clr_sprites: lea copspr,a0
move.l #$0120,d0
move.l #7,d1
cl_spr_pnt: move.w d0,(a0)+
clr.w (a0)+
add.w #2,d0
move.w d0,(a0)+
clr.w (a0)+
add.w #2,d0
dbra d1,cl_spr_pnt
rts
make_sin_tab: lea sincos+128,a0
lea sincos+128,a1
lea sincos+640,a2
move.w #63,d0
msl00: move.w -(a0),(a1)+
move.w (a0),-(a2)
dbra d0,msl00
move.w #127,d0
msl01: move.w (a0)+,d1
neg.w d1
move.w d1,(a1)+
dbra d0,msl01
rts
grname: dc.b "graphics.library",0,0
copper: dc.w $008e,$3081,$0090,$08c1
dc.w $0092,$0038,$0094,$00d0
dc.w $0102,$0000,$0104,$0000
dc.w $0108,$0000,$010a,$0000
dc.w $0100,$1200
dc.w $0180,$0000,$0182,$0000
copspr: blk.b 64,0
bpls: dc.w $00e0,$0000,$00e2,$0000
dc.w $00e4,$0000,$00e6,$0000
dc.w $00e8,$0000,$00ea,$0000
dc.w $00ec,$0000,$00ee,$0000
copsinu1: blk.b 4*width*200,0
dc.w $ffff,$fffe
copsinus: blk.b 4*width*200,0
coptbl:
dc.w $0180,$0ce0,$0180,$0ce0,$0180,$0cd0,$0180,$0cd0
dc.w $0180,$0dd0,$0180,$0cc0,$0180,$0cb0,$0180,$0ba0
dc.w $0180,$0ba0,$0180,$0b90,$0180,$0a80,$0180,$0a70
dc.w $0180,$0a70,$0180,$0960,$0180,$0960,$0180,$0850
dc.w $0180,$0840,$0180,$0840,$0180,$0740,$0180,$0730
dc.w $0180,$0630,$0180,$0620,$0180,$0620,$0180,$0520
dc.w $0180,$0510,$0180,$0410,$0180,$0410,$0180,$0400
dc.w $0180,$0300,$0180,$0300,$0180,$0200,$0180,$0200
dc.w $0180,$0200,$0180,$0200,$0180,$0200,$0180,$0300
dc.w $0180,$0310,$0180,$0310,$0180,$0310,$0180,$0420
dc.w $0180,$0420,$0180,$0430,$0180,$0440,$0180,$0540
dc.w $0180,$0550,$0180,$0550,$0180,$0550,$0180,$0460
dc.w $0180,$0460,$0180,$0460,$0180,$0370,$0180,$0370
dc.w $0180,$0270,$0180,$0170,$0180,$0180,$0180,$0080
dc.w $0180,$0080,$0180,$0081,$0180,$0092,$0180,$0093
dc.w $0180,$0094,$0180,$0095,$0180,$00a6,$0180,$00a7
dc.w $0180,$00a7,$0180,$00a7,$0180,$00a8,$0180,$00a8
dc.w $0180,$00a9,$0180,$00aa,$0180,$009a,$0180,$008a
dc.w $0180,$008a,$0180,$007a,$0180,$006a,$0180,$005a
dc.w $0180,$005a,$0180,$004a,$0180,$003a,$0180,$002a
dc.w $0180,$002a,$0180,$001a,$0180,$000a,$0180,$010a
dc.w $0180,$010a,$0180,$020a,$0180,$030a,$0180,$040a
dc.w $0180,$040a,$0180,$050a,$0180,$060a,$0180,$070a
dc.w $0180,$080a,$0180,$080a,$0180,$090a,$0180,$0a0a
dc.w $0180,$0a0a,$0180,$0a0a,$0180,$0a0a,$0180,$0a09
dc.w $0180,$0909,$0180,$0908,$0180,$0908,$0180,$0907
dc.w $0180,$0907,$0180,$0907,$0180,$0906,$0180,$0906
dc.w $0180,$0805,$0180,$0805,$0180,$0805,$0180,$0804
dc.w $0180,$0804,$0180,$0804,$0180,$0803,$0180,$0803
dc.w $0180,$0703,$0180,$0702,$0180,$0702,$0180,$0702
dc.w $0180,$0702,$0180,$0701,$0180,$0701,$0180,$0701
dc.w $0180,$0601,$0180,$0600,$0180,$0600,$0180,$0600
dc.w $0180,$0600,$0180,$0600,$0180,$0600,$0180,$0710
dc.w $0180,$0710,$0180,$0720,$0180,$0820,$0180,$0830
dc.w $0180,$0830,$0180,$0840,$0180,$0951,$0180,$0961
dc.w $0180,$0961,$0180,$0a71,$0180,$0a81,$0180,$0a81
dc.w $0180,$0a91,$0180,$0ba1,$0180,$0bb1,$0180,$0bb1
dc.w $0180,$0bc1,$0180,$0ac2,$0180,$0ac2,$0180,$0ad2
dc.w $0180,$09d2,$0180,$09d2,$0180,$08d2,$0180,$08e2
dc.w $0180,$08e3,$0180,$07e3,$0180,$07f3,$0180,$06f3
dc.w $0180,$06f3,$0180,$06f3,$0180,$06f3,$0180,$05e3
dc.w $0180,$05e3,$0180,$05e3,$0180,$04e3,$0180,$04e3
dc.w $0180,$04d2,$0180,$03d2,$0180,$03d2,$0180,$03d2
dc.w $0180,$02c2,$0180,$02c2,$0180,$02c2,$0180,$02c3
dc.w $0180,$02b3,$0180,$02b3,$0180,$02b3,$0180,$02b3
dc.w $0180,$02a3,$0180,$02a3,$0180,$02a3,$0180,$01a3
dc.w $0180,$01a3,$0180,$0180,$0180,$0180,$0180,$0180
dc.w $0180,$0180,$0180,$0180,$0180,$0180,$0180,$0180
dc.w $0180,$0180,$0180,$0180,$0180,$0185,$0180,$0185
dc.w $0180,$0180,$0180,$0187,$0180,$0187,$0180,$0180
dc.w $0180,$0178,$0180,$0168,$0180,$0158,$0180,$0158
dc.w $0180,$0148,$0180,$0138,$0180,$0138,$0180,$0128
dc.w $0180,$0118,$0180,$0218,$0180,$0218,$0180,$0318
dc.w $0180,$0418,$0180,$0418,$0180,$0518,$0180,$0618
dc.w $0180,$0718,$0180,$0718,$0180,$0818,$0180,$0817
dc.w $0180,$0816,$0180,$0816,$0180,$0815,$0180,$0814
dc.w $0180,$0814,$0180,$0180,$0180,$0180,$0180,$0183
dc.w $0180,$0183,$0180,$0180,$0180,$0180,$0180,$0181
dc.w $0180,$0181,$0180,$0181,$0180,$0281,$0180,$0281
dc.w $0180,$0381,$0180,$0381,$0180,$0381,$0180,$0481
dc.w $0180,$0481,$0180,$0481,$0180,$0581,$0180,$0581
dc.w $0180,$0681,$0180,$0681,$0180,$0681,$0180,$0781
dc.w $0180,$0781,$0180,$0881,$0180,$0881,$0180,$0881
dc.w $0180,$0871,$0180,$0871,$0180,$0861,$0180,$0861
dc.w $0180,$0861,$0180,$0861,$0180,$0861,$0180,$0871
dc.w $0180,$0881,$0180,$0982,$0180,$0992,$0180,$0992
dc.w $0180,$0892,$0180,$0892,$0180,$0893,$0180,$08a3
dc.w $0180,$08a3,$0180,$07a3,$0180,$07a3,$0180,$07a4
dc.w $0180,$07a4,$0180,$07b4,$0180,$07b4,$0180,$06b5
dc.w $0180,$06b5,$0180,$06b5,$0180,$06b5,$0180,$06c6
dc.w $0180,$06c6,$0180,$06c7,$0180,$06c7,$0180,$07c8
dc.w $0180,$07c8,$0180,$07d9,$0180,$08d9,$0180,$08da
dc.w $0180,$08da,$0180,$08da,$0180,$08d9,$0180,$07c9
dc.w $0180,$07c9,$0180,$07b8,$0180,$07b8,$0180,$06b8
dc.w $0180,$06a7,$0180,$06a7,$0180,$06a7,$0180,$0596
dc.w $0180,$0596,$0180,$0596,$0180,$0585,$0180,$0485
dc.w $0180,$0475,$0180,$0475,$0180,$0474,$0180,$0364
dc.w $0180,$0364,$0180,$0363,$0180,$0353,$0180,$0353
dc.w $0180,$0253,$0180,$0242,$0180,$0242,$0180,$0232
dc.w $0180,$0232,$0180,$0131,$0180,$0121,$0180,$0121
dc.w $0180,$0121,$0180,$0e09,$0180,$0e0a,$0180,$0e0c
dc.w $0180,$0e0d,$0180,$0d0e,$0180,$0c0e,$0180,$0b0e
dc.w $0180,$090e,$0180,$090e,$0180,$070e,$0180,$060e
dc.w $0180,$050e,$0180,$030e,$0180,$020e,$0180,$010e
dc.w $0180,$000e,$0180,$001e,$0180,$002e,$0180,$003e
dc.w $0180,$004e,$0180,$005e,$0180,$005e,$0180,$006e
dc.w $0180,$007e,$0180,$008f,$0180,$009f,$0180,$00af
dc.w $0180,$00bf,$0180,$00cf,$0180,$00df,$0180,$00ef
scr_buffer: blk.b 8000,$55
sincos: dc.w 00000,00804,01607,02410,03211,04011
dc.w 04808,05602,06392,07179,07961,08739
dc.w 09512,10278,11039,11793,12539,13278
dc.w 14010,14732,15446,16151,16846,17530
dc.w 18204,18868,19519,20159,20787,21403
dc.w 22005,22594,23170,23732,24279,24812
dc.w 25330,25832,26319,26790,27245,27684
dc.w 28106,28511,28898,29269,29621,29956
dc.w 30273,30572,30852,31114,31357,31581
dc.w 31785,31971,32138,32285,32413,32521
dc.w 32610,32679,32728,32758
blk.b 512,0
sinuspn1: dc.w 0
sinuspn2: dc.w 0